package com.ler.yrmall.member.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ler.yrmall.basic.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Leron
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("ums_growth_change_history")
public class GrowthChangeHistoryEntity extends BaseEntity<GrowthChangeHistoryEntity> {

    /**
     * member_id
     */
    private Long memberId;

    /**
     * 成长值变更
     */
    private Integer changeCount;

    /**
     * 备注
     */
    private String remark;

    /**
     * 数据来源
     * @see DataSource
     */
    private Integer dataSource;


    public enum DataSource {

        /**
         * 每日签到
         */
        CHECKIN(1,10,"每日签到");

        private final Integer code;

        private final Integer score;

        private final String remark;

        DataSource(Integer code, Integer score, String remark) {
            this.code = code;
            this.score = score;
            this.remark = remark;
        }

        public Integer getCode() {
            return code;
        }

        public String getRemark() {
            return remark;
        }

        public Integer getScore() {
            return score;
        }
    }

}
